#ifndef VIRMACHINEINFOR_H
#define VIRMACHINEINFOR_H

#include <QObject>
#include <mutex>
#include <QQueue>
#include <QPair>
#include "mytypes.h"

class VirMachineInfor final:public QObject
{
    Q_OBJECT
public:
    static VirMachineInfor* GetInstance(QObject* parent=nullptr);
    virtual ~VirMachineInfor();

    void SubmitInfor(Yzty::ITEMCODE mcode,QVector<Yzty::BaceInfor*>& infors);

    const QVector<Yzty::BaceInfor*>& GetItemInfor(Yzty::ITEMCODE);
private:
    explicit VirMachineInfor(QObject* parent=nullptr);
    static VirMachineInfor* _instance;

private:
    std::mutex      _mutex;
    QVector<QVector<Yzty::BaceInfor*>>                      _infors;

};

#endif // VIRMACHINEINFOR_H
